<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <span>点我span2</span>

    <a href="javascript:history.go(-1)">点我我也想回span1</a>
    <script>
        document.querySelector('span').onclick=function(){
            //location.href='./01js_jichu.html'
            window.history.back()
        }
    </script>
</body>
</html>